#include"Double LinkedList.h"

int main() {

	DListNode* Head = ListCreate();

	ListPushBack(Head, 1);
	ListPushBack(Head, 2);
	ListPushBack(Head, 3);
	ListPushBack(Head, 4);
	ListPushBack(Head, 10);
	ListPushBack(Head, 11);
	ListPushBack(Head, 12);
	ListPushBack(Head, 13);
	ListPrint(Head);
	printf("\n");

	ListPushFront(Head, 5);
	ListPushFront(Head, 6);
	ListPushFront(Head, 7);
	ListPrint(Head); 
	printf("\n");

	ListPopBack(Head);
	ListPopBack(Head); 
	ListPopBack(Head);
	ListPrint(Head); 
	printf("\n");

	ListPopFront(Head);
	ListPopFront(Head);
	ListPopFront(Head);
	ListPopFront(Head);
	ListPrint(Head);
	printf("\n");

	DListNode* find = ListFind(Head, 3);
	ListInsertBehindPos(find, 15);
	ListPrint(Head);
	printf("\n");

	find = ListFind(Head, 2);
	ListInsertBeforePos(find, 16);
	ListPrint(Head);
	printf("\n");

	find = ListFind(Head, 4);
	ListErase(find);
	ListPrint(Head);
	printf("\n");

	ListDestory(Head);
	Head = NULL;

	return 0;
}